﻿@using Controllers
@using Models
@using PetaPoco
@{
    var func=new MyFunc();
}
<!DOCTYPE HTML>
<html lang="en-US">
<head>
@Html.Partial("_top")
</head>
<body>
    <div id="wrapper">
@Html.Partial("_header")
        <div id="masterbody" class="maxwidth">
            <div class="bk10"></div>
            <div class="lmTitle"><h2>@ViewBag.model.title</h2></div>
            <div class="bk10"></div>
            <div class="contentcon">@Html.Raw(ViewBag.model.content)
                    <ul class="newslist">
                        @{
							var page = Request.QueryString["page"];
							int p = 1;
							int pagesize=15;
							if (!string.IsNullOrEmpty(page))
							{
								p = Convert.ToInt32(page);
							}
							Page<cxinxiModel> pagelist=func.GetPageListKeySearch(p,pagesize,ViewBag.model.title);
						}
						
				@for(var i = 0;i<pagelist.Items.Count;i++)
				{				
				var item=pagelist.Items[i];						
				var url=string.IsNullOrEmpty(item.url)?"/article/"+item.ID:item.url;
				var target=string.IsNullOrEmpty(item.url)?"_self":"_blank";				
					<li><a href="@url" title="@item.title" target="@target">@item.title<p>@item.addtime.ToString("yyyy-MM-dd")</p></a></li>
				}
                    </ul>
					
			</div>
        </div>	
			<div id="mcopyright">@Html.Raw(ViewBag.model.copyright)</div>
        <div class="gotop"><a href="#top">返回顶部</a></div>
        <div class="space"></div>
</body>
</html>